package longcaisuyun.longcai.com.net;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/8/22.
 */
@HttpInlet(NewNet.DRIVRTORDERCOST)
public class GetDriverOrderCost  extends NewWHAsyGet<GetDriverOrderCost.Info> {

    public String driverid;
    public String orderid;


    public GetDriverOrderCost(String driverid,String orderid,AsyCallBack<Info>  asyCallBack) {
        super(asyCallBack);
        this.driverid=driverid;
        this.orderid=orderid;

    }


    @Override
    protected Info parser(JSONObject object) {

        if(object.optString("message").equals("1"))
        {
            Info info=new Info();

            info.account=object.optString("account");
            info.cartype=object.optString("cartype");
            info.money=object.optString("money");
            info.unit=object.optString("unit");
            info.price=object.optString("price");
            info.jili=object.optString("jili");
            info.costs=object.optString("costs");
            info.ordercosts=object.optString("ordercosts");
            info.couponprice=object.optString("couponprice");
            info.webtel=object.optString("webtel");
            info.payttime=object.optString("payttime");

            return info;
        }

        TOAST="未查询到订单";

        return null;
    }

    public static class Info
    {

        public String account;
        public String cartype;
        public String money;
        public String unit;
        public String price;
        public String jili;
        public String costs;
        public String ordercosts;
        public String couponprice;
        public String webtel;

        public String payttime;
    }


}
